package sqltool;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;



public class SQLConn {
	Connection conn;
	public Connection getconnection() 
	{
		String URL="jdbc:mysql://127.0.0.1:3306/intelligent_store";
		//String URL="jdbc:mysql://120.27.114.168:3306/login_test?useUnicode=true&characterEncoding=utf8";
		String User="root";
		String Password="123";
		try {
			Class.forName("com.mysql.jdbc.Driver");
			conn=DriverManager.getConnection(URL, User, Password);			
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return conn;		
	}

}
